package es.tessier.asteroides;


import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.util.Log;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.widget.Toast;

public class Asteroids extends Activity {
	
	String TAG = "asteroids";
	public static ScoreHolder holder = new ScoreHolderArray();
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		Log.d(TAG, "onCreate");
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_principal);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		 MenuInflater inflater = getMenuInflater();
		 inflater.inflate(R.menu.menu, menu);		

		 return true;
	}

	@Override
	public boolean onOptionsItemSelected(MenuItem item) {
		switch (item.getItemId()) {
		case R.id.menu_about:
			Log.d(TAG, "MenuClickAbout");
			startActivity(new Intent(this, About.class));
			break;
		case R.id.menu_settings:
			Log.d(TAG, "MenuClickSettings");
			startActivity(new Intent(this, Preferences.class));
			break;
		}

		return true;
	}

	public void onClickPlay(View v) {
		Log.d(TAG, "onClickPlay");
		Toast.makeText(	this,	"Play", Toast.LENGTH_LONG).show();

	}
	
	public void onClickConfigure(View v) {
		Log.d(TAG, "onClickConfigure");		
		startActivity(new Intent(this, Preferences.class));	

	}

	
	public void onClickScore(View v) {
		Log.d(TAG, "onClickScore");
		startActivity(new Intent(this, Scores.class));

	}

	public void onClickExit(View v) {
		Log.d(TAG, "onClickExit");
		finish();

	}
}
